package com.ybwh.springboot2.okadmin.sys.model.po;

import com.alibaba.fastjson.JSON;
import com.gitee.fastmybatis.annotation.Column;
import com.gitee.fastmybatis.annotation.LogicDeleteStrategy;
import com.gitee.fastmybatis.annotation.Pk;
import com.gitee.fastmybatis.annotation.Table;
import com.ybwh.springboot2.common.enums.EnumField;
import com.ybwh.springboot2.okadmin.enums.FuncType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;



/**
* 系统功能
* @author Fan Beibei
* @date   2023-04-08 19:26:56
*/
@Data
@Table(name = "sys_func",pk = @Pk(name = "id"))
public class SysFunc {

	/**
	* 主键
	*/
	@ApiModelProperty(value="主键")
	private Long id;
	/**
	* 唯一编码
	*/
	@ApiModelProperty(value="唯一编码")
	private String code;
	/**
	* 显示名称
	*/
	@ApiModelProperty(value="显示名称")
	private String text;

	@EnumField(FuncType.class)
	@ApiModelProperty(value="menu-菜单;button-按钮;api-功能接口")
	private String type;
	/**
	* 父级ID
	*/
	@ApiModelProperty(value="父级ID")
	private Long parentId;
	/**
	* id路径,从顶级祖先id到自己id,以/开头,用/分隔
	*/
	@ApiModelProperty(value="id路径,从顶级祖先id到自己id,以/开头,用/分隔")
	private String idPath;
	@ApiModelProperty(value="是否删除:非0-是，0-否")
	@Column(logicDelete = true,notDeleteValue = "0",logicDeleteStrategy = LogicDeleteStrategy.ID_FILL)
	private Long deleted;
	/**
	* 创建人
	*/
	@ApiModelProperty(value="创建人")
	private Long createId;
	/**
	* 创建时间
	*/
	@ApiModelProperty(value="创建时间")
	private LocalDateTime createTime;
	/**
	* 更新人
	*/
	@ApiModelProperty(value="更新人")
	private Long updateId;
	/**
	* 更新时间
	*/
	@ApiModelProperty(value="更新时间")
	private LocalDateTime updateTime;

	@Override
	public String toString() {
	return JSON.toJSONString(this);
	}

}